package studiodiva.portfolio.client.lib.collections;

import static studiodiva.portfolio.client.lib.lang.Lang.list;

public class LinkedHashMap<K, V> extends java.util.HashMap<K, V> implements LinkedMap<K, V> {
  @Override
  public V getValue(int index) {
    return list(values()).get(index);
  }

  public boolean hasKey(K key) {
    return super.containsKey(key);
  };

  public boolean hasValue(V value) {
    return super.containsValue(value);
  };

  @Override
  public int indexOf(String key) {
    return list(keySet()).indexOf(key);
  }

  public V value(K key) {
    return super.get(key);
  }

}
